<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.6.0/jquery.js"></script>
</head>
<style>
    * {
        margin: 0;
        padding: 0;
    }

    .box {
        width: 900px;
        height: 600px;
        margin: auto;
        background-color: antiquewhite;
        text-align: center;
    }

    input {
        width: 30px;
        height: 30px;
    }

    .left,
    .right {
        width: 350px;
        height: 100%;
        font-size: 30px;
    }

    .left {
        float: left;
        background: yellow;
    }

    .right {
        float: right;
        background: tomato;
    }
    ul li{
        list-style: none;
    }
    .conter{
        height: 194px;
        height: 100%;
        float: left;
        background: turquoise;
    }
    button{
        width: 97px;
        height: 97px;
        margin-top: 250px;
    }
</style>

<body>
    <div class="box">
        <div class="left">
            <input type="checkbox" id="leftAll">列表一
            <div class="left1">
                <ul id="u1">
                    <li><input type="checkbox" class="int">左1</li>
                    <li><input type="checkbox" class="int">左2</li>
                    <li><input type="checkbox" class="int">左3</li>
                    <li><input type="checkbox" class="int">左4</li>
                    <li><input type="checkbox" class="int">左5</li>
                </ul>
            </div>
        </div>
        <div class="conter">
            <!-- <input type="button" value=""> -->
            <button id="rightBtn">&gt;</button>
            <button id="leftBtn">&lt;</button>
        </div>
        <div class="right">
            <input type="checkbox" id="rightAll">列表二
            <div class="right1">
                <ul id="u2">
                    <li><input type="checkbox" class="int">右1</li>
                    <li><input type="checkbox" class="int">右2</li>
                    <li><input type="checkbox" class="int">右3</li>
                    <li><input type="checkbox" class="int">右4</li>
                    <li><input type="checkbox" class="int">右5</li>
                </ul>
            </div>
        </div>
    </div>
</body>
<script>
    $(function(){
        console.log($('#leftAll'));
        $('#leftAll').click(SelcetLi1)
        $('#rightAll').click(SelcetLi2)
        $('#leftBtn').click(moveList1)
        $('#rightBtn').click(moveList2)
    })

    function SelcetLi1 () {
        let chec = $('#leftAll').prop('checked')
        console.log($('.left1 input').prop('checked',chec));
        if($('#u1 li') == true){
            $('#leftAll').prop('checkbox',true)
        }
    }
    function SelcetLi2 () {
        let chec = $('#rightAll').prop('checked')
        console.log($('.right1 input').prop('checked',chec));
    }
    function moveList2 () { 
            $('#u2').append($('.left1 input:checked').parent())   
            $('#leftAll').prop('checked',false)
            
    }
    function moveList1 () { 
            $('#u1').append($('.right1 input:checked').parent())   
            $('#rightAll').prop('checked',false)

    }
</script>
</html>